{template 'public/header'}

{template 'public/comhead'}
<link rel="stylesheet" type="text/css" href="../addons/zh_tcwq/template/public/ygcsslist.css">
<style type="text/css">
    .navback{display: none;}
    .yg_back{margin-left: 170px;}
</style>
<ul class="nav nav-tabs">
    <span class="ygxian"></span>
    <div class="ygdangq">当前位置:</div>
    <li class="active"><a href="javascript:void(0);">资金流水</a></li>
</ul>

<div class="row ygrow">
   <!-- <form action="" method="get" class="col-md-4">
        <input type="hidden" name="c" value="site" />
        <input type="hidden" name="a" value="entry" />
        <input type="hidden" name="m" value="zh_tcwq" />
        <input type="hidden" name="do" value="user2" />

        <div class="input-group" style="width: 300px">

            <input type="text" name="keywords" class="form-control" value="{$_GPC['keywords']}" placeholder="请输入昵称">

                    <span class="input-group-btn">

                        <input type="submit" class="btn btn-default" name="submit" value="查找"/>

                    </span>

        </div>

        <input type="hidden" name="token" value="{$_W['token']}"/>

    </form>-->
    <!--<div class="col-md-4">
        <div class="btn ygyouhui2" id="allselect">批量删除</div>
    </div>-->
</div>
<div class="main">
    <div class="panel panel-default">

        <div class="panel-heading">

            用户列表

        </div>

        <div class="panel-body" style="padding: 0px 15px;">

            <div class="row">

                <table class="yg5_tabel col-md-12">

                    <tr class="yg5_tr1">

                        <th class="store_td1 col-md-1" >流水id</th>
                        <th class="store_td1 col-md-1">用户昵称</th>
                        <th class="col-md-1">交易金额</th>
                        <th class="col-md-1">交易时间</th>
                        <th class="col-md-1">交易类型</th>

                    </tr>

                    {loop $list $row}

                    <tr class="yg5_tr2">

                       <!-- <td>

                            <input type="checkbox" name="test" value="{$row['id']}">

                        </td>-->

                        <td >{$row['id']}</td>


                        <td>{$username}</td>

                        <td>{$row['money']}</td>
                        <td>{$row['create_time']}</td>

                       <td>

                           <!-- 1.打赏支出 2，打赏收入3，任务支出4，任务收入-->
                            <!--<a href="javascript:void(0);" data-toggle="modal" data-target="#myModalb{$row['id']}"><span class="btn btn-xs ygyouhui2">充值余额</span> </a>-->
                            {if $row['type']==1}
                            <button type="button" class="btn storered btn-xs" data-toggle="modal" data-target="#myModal2{$row['id']}">打赏支出</button>
                            {/if}
                            {if $row['type']==2}
                            <button type="button" class="btn storeblue btn-xs" data-toggle="modal" data-target="#myModal3{$row['id']}">打赏收入</button>
                            {/if}
                           {if $row['type']==3}
                           <button type="button" class="btn storered btn-xs" data-toggle="modal" data-target="#myModal3{$row['id']}">任务支出</button>
                           {/if}
                           {if $row['type']==4}
                           <button type="button" class="btn storeblue btn-xs" data-toggle="modal" data-target="#myModal3{$row['id']}">任务收入</button>
                           {/if}

                        </td>
                    </tr>


                    {/loop}

                    {if empty($list)}

                    <tr class="yg5_tr2">

                        <td colspan="12">

                            暂无用户信息

                        </td>

                    </tr>

                    {/if}





                </table>

            </div>

        </div>

    </div>

</div>

<div class="text-right we7-margin-top">

    {$pager}

</div>





<!-- {template 'common/footer'} -->

<script type="text/javascript">

    $(function(){
        // $("#frame-11").show();
        $("#yframe-11").addClass("wyactive");

        $(".allcheck").on('click',function(){
            var checked = $(this).get(0).checked;
            $("input[type=checkbox]").prop("checked",checked);
        });

        // ———————————————批量删除———————————————
        $("#allselect").on('click',function(){
            var check = $("input[type=checkbox][class!=allcheck]:checked");
            if(check.length < 1){
                alert('请选择要删除的商家!');
                return false;
            }else if(confirm("确认要删除此商家?")){
                var id = new Array();
                check.each(function(i){
                    id[i] = $(this).val();
                });
                console.log(id)
                $.ajax({
                    type:"post",
                    url:"{$_W['siteroot']}/app/index.php?i={$_W['uniacid']}&c=entry&do=DelUser&m=zh_tcwq",
                    dataType:"text",
                    data:{id:id},
                    success:function(data){
                        console.log(data);
                        location.reload();
                    }
                })

            }
        });
    })

</script>

